#pragma once

#include "ColligereDataImporterBase.hpp"
#include "ColligereAudioDatabaseHandler.hpp"
#include "ColligereXmlUtils.hpp"

namespace col {

class ColligereXmlDataImporter : public XmlDataImporterBase
{
public:
	void Load ( const wxURI &rIn );

	void Import ( DatabaseInterfaceBase &rDest );

	//! Returns the count of "album" nodes.
	wxUint32 GetItemCount() const;
protected:
	void InitializeItemFromNode ( const wxXmlNode *pNode, DatabaseItemBase &rItem ) const;
private:
	bool IsValidColligereXmlFile() const;

	void ParseTracks ( const wxXmlNode *pFromAlbumNode, Album &rToAlbum ) const;

	wxXmlDocument mInDoc;
};

}